/*
 * @Author: Klein
 * @Date: 2021-06-19 17:45:03
 * @Description: file content
 */

const axios = require("axios");

const proxyGet = async (url, params) => {
  const result = await axios.get(url, { params: params });
  // const { request } = result;
  if (result.status === 200) {
    return result.data;
  }
  return result.data;
};

const proxyPost = async (url, data) => {
  const result = await axios.post(url, data);
  return result;
};

module.exports = {
  proxyGet,
  proxyPost,
};
